1. Field of the Invention
The present invention relates to a printing system and a printing apparatus. More particularly, it relates to a printing system and a printing apparatus which can ensure high-speed, normal printing with small memory requirements even when lots of print commands are sent to a printer.
2. Related Background Art
FIG. 12 is a diagram illustrating a printing control method and a flow of printing processes on a conventional printing system. Generally, the conventional printing system consists of a host computer 2000 and printing apparatus 2100 connected via a parallel communications device (such as a Centronics interface) or network communications device.
On the host computer 2000, application software 201 (hereinafter referred to as xe2x80x9capplicationsxe2x80x9d) such as a word processor and spreadsheet is running on so-called basic software such as Windows (a registered trademark of Microsoft Corporation). To carry out printing in this application, the applications use functions of a graphic subsystem from among a number of subsystems provided by the basic software among programs. The graphic subsystem, which is called, for example, GDI (Graphic Device Interface) 2002 in the case of Windows (registered trademark), processes image information for a display and printer.
The GDI 2002 dynamically links a module called a device driver to cancel out device dependence on a display or printer and produces output to each device. The module for a printer is called a printer driver 2003. The printer driver 2003 must provide a function group called a DDI (Device Driver Interface) which is designed to be mounted in the device driver according to its capabilities, features, etc. The GDI 2002 converts API (Application Programming Interface) calls from an application for the device driver and calls the DDI function group, as required, to carry out a predetermined printing process.
In this way, the GDI 2002 processes print requests from applications sequentially via the printer driver. Printer drivers are roughly divided into image mode printer drivers which themselves prepare data in image data format used for output and PDL mode printer drivers which handles PDL (Printer Description Language) commands intended for printers capable of rendering.
PDL mode printer drivers will be described here. The printer driver 2003 generates a PDL command for each DDI function. The generated print commands are sent out to the printing apparatus 2100 via the GDI 2002 and an I/F 2004.
The print commands are stored temporarily in a receive buffer 2103 and analyzed by a command analyzer 2107. Intermediate-language data processible at high speed on a printer is generated as a result of the analysis and stored in an intermediate-language data storage area of a page memory 2106. The intermediate-language data is generated in units of bands. When one page of intermediate-language data is accumulated in the page memory 2106, a list structure corresponding to band areas (a unit of processing) is generated. The list structure created in this way is referred to as a band list.
Using the intermediate-language data linked to the band list, a rendering process is carried out in band memory areas of the page memory 2106 provided by hardware or software. The image data generated on the band memory is converted into video signals (shipping process) in synchronization with rotation of an engine. By providing two such band memories and using them repeatedly, it is possible to carry out the rendering and shipping processes in synchronization with the engine in a limited memory space.
However, such a conventional technique has the following problems. Specifically, in PDL-mode processing, since all data received from DDI functions are converted as draw commands, theoretically there is no upper limit to the size and number of print commands. Therefore, if the size of intermediate-language data exceeds the intermediate-language data storage area in the printing apparatus 2100, one page of intermediate-language data cannot be generated, and thus the banding process cannot be carried out. Also, if the printer driver issues complex or a large number of drawing commands to some part, rendering time for a particular band becomes longer on the printing apparatus 2100 than the time required for shipping to the printer engine, resulting in a print overrun error in which printing stops in the middle, and thus making synchronous band rendering impossible.
Page printers have solved such problems using a combination of the following methods.
One of the methods is a sub-closing scheme. This method consists of four steps. In the first step, intermediate-language data which has been stored before the page memory is overflowed is drawn and compressed (PackBits, Run Length, JBIG, or other compression) using an extraction band memory and the rendered and compressed image data is retained as compressed intermediate-language data. In the second step, stored intermediate-language data which has been rendered is erased to increase free space in the page memory. In the third step, intermediate-language data yet to be stored is placed in the free space and when the entire page has been stored in the page memory, the compressed image data reregistered in the first step is treated as intermediate-language data to enable synchronous band rendering. In the fourth step, the first step is repeated if the page does not fit in the page memory after the above processes. Incidentally, compressed image data which has already been registered is rendered first, the new intermediate-language data is rendered, and the entire band is compressed again.
Another method is a pre-banding scheme. In this mode, if intermediate-language data is concentrated on one band, a rendering process may not be able to keep up with engine speed. Thus, if a band area is so judged, when intermediate-language data is registered within a printer, a rendering process is carried out in a band memory prepared before the engine is started up.
Of the schemes described above, the sub-closing scheme, which retains developed images in a compressed state for memory saving, has the problem that a sub-closing process will decrease throughput considerably because compression and expansion, when repeated, will take time.
On the other hand, the pre-banding scheme has the problem that it cannot secure a memory area required for pre-banding if pre-banding processes must be carried out in two or more bands, which fact is liable to cause a shift to a sub-closing process.
Thus, although conventional schemes provide memory-saving, high-speed printing systems if synchronous banding is available, they have the problem that additional processing time is required if synchronous banding is disabled frequently.
The present invention has been achieved in view of the above problem. Its object is to provide a printing system and printing apparatus which can ensure high-speed, normal printing with small memory requirements even when lots of print commands are sent to a printer.
To achieve the above object, the present invention provides a printing system in which a computer provided with a printer driver is connected with a printing apparatus which runs a rendering process in response to print command data generated by the above described printer driver, wherein: the above described printer driver comprises data conversion means for converting drawing commands into an intermediate-language data format processible at high speed within the above described printing apparatus, data holding means for storing one page of the converted intermediate-language data, data information holding means for storing intermediate-language data information generated by accumulating, for each band, information such as the type, data size, item count, etc. of the intermediate-language data stored in the data holding means, and print command data generation means for converting one page of intermediate-language data into print command data; the above described printing apparatus comprises data generation means for generating intermediate-language data by interpreting the print command data from the above described printer driver, page data holding means for storing one page of the intermediate-language data, print mode determination means for analyzing the top of the page of the intermediate-language data stored in the page data holding means, thereby estimating the size of the print data, and determining a print mode based on the results of estimation, and rendering means for running a rendering process using one page of the intermediate-language data in the print mode determined by the print mode determination means; when one page of intermediate-language data is stored in the above described data holding means, the print data generation means of the above described printer driver generates print command data by adding the intermediate-language data information stored in the above described data information holding means to the top of the page of the intermediate-language data; and the print mode determination means of the above described printing apparatus judges whether the above described intermediate-language data can fit in the above described page data holding means when the above described print command data is converted in normal print mode and selects the normal print mode if the data can fit in, but selects compressed print mode if the data cannot fit in.
Also, the present invention provides a printing system in which a computer provided with a printer driver is connected with a printing apparatus which runs a rendering process in response to print command data generated by the above described printer driver, wherein: the above described printer driver comprises data conversion means for converting drawing commands into an intermediate-language data format processible at high speed within the above described printing apparatus, data holding means for storing one page of the converted intermediate-language data, data registration means for registering the above described intermediate-language data in a band list which corresponds to band processing performed within the above described printing apparatus, data information collection means for collecting intermediate-language data information for each above described band list registered with the data registration means, print command data generation means for converting one page of intermediate-language data into print command data in sequence beginning with the one registered at the top of the band list with page information containing the all collected band information at the head as soon as one page of intermediate-language data is accumulated in the above described data holding means; the above described printing apparatus comprises data generation means for generating intermediate-language data by interpreting the print command data from the above described printer driver, page data holding means for storing one page of the intermediate-language data, synchronous/asynchronous mode judgement means for determining, by analyzing the page information stored in the page data holding means, whether or not to carry out a rendering process in synchronization with an engine, engine-synchronized rendering means, and non-engine-synchronized rendering means.
Also, the present invention provides a printing apparatus, comprising: data generation means for generating intermediate-language data by interpreting print command data from a printer driver; page data holding means for storing one page of the intermediate-language data; print mode determination means for analyzing the top of the page of the intermediate-language data stored in the page data holding means, thereby estimating the size of the print data, and determining a print mode based on the results of estimation; rendering means for rendering one page of intermediate-language data in the print mode determined by the print mode determination means, wherein the above described print mode determination means judges whether the above described intermediate-language data can fit in the above described page data holding means when the above described print command data is converted in normal print mode and selects the normal print mode if the data can fit in, but selects compressed print mode if the data cannot fit in.
Other features and advantages of the present invention will be apparent from the following description taken in conjunction with the accompanying drawings, in which like reference characters designate the same or similar parts throughout the figures thereof.